/**
 * @Author: hcc
 * @Date: 2022-04-08
 * @Last Modified by: hcc
 * @Last Modified time: 2022-04-08
 */
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [
  {
    path: '/omFinanceP',
    meta: {
      title: '财务管理',
      icon: 'el-icon-s-cooperation'
    },
    redirect: '/omFinanceP',
    component: RouteView,
    children: [
      {
        path: '/omFinanceP/MoneyManage',
        meta: {
          title: '资金管理'
        },
        redirect: '/omFinanceP/MoneyManage',
        component: RouteView,
        children: [
          {
            path: '/omFinanceP/MoneyManage/DealerAccountQuery',
            meta: {
              title: '经销商账户查询',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/MoneyManage/DealerAccountQuery')
          },

          {
            path: '/omFinanceP/MoneyManage/AccountManage',
            meta: {
              title: '账户管理',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/MoneyManage/AccountManage')
          },
          {
            path: '/omFinanceP/MoneyManage/AccountDetailsQuery',
            meta: {
              title: '账户明细查询',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/MoneyManage/AccountDetailsQuery')
          },
          {
            path: '/omFinanceP/MoneyManage/BankInfoMaintain',
            meta: {
              title: '三方银行信息维护',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/MoneyManage/BankInfoMaintain')
          },
          {
            path: '/omFinanceP/FinanceManage/InvoiceNumberQuery',
            meta: {
              title: '三方票号查询',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/FinanceManage/InvoiceNumberQuery')
          },
          {
            path: '/omFinanceP/FinanceManage/InvoiceUseQuery',
            meta: {
              title: '三方票据使用查询',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/FinanceManage/InvoiceUseQuery')
          },
          {
            path: '/omFinanceP/FinanceManage/VehicleStorageAgeRemind',
            meta: {
              title: '三方车辆库龄提醒',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/FinanceManage/VehicleStorageAgeRemind')
          },
          {
            path: '/omFinanceP/FinanceManage/RepayRecordsImport',
            meta: {
              title: '还款记录导入',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/FinanceManage/RepayRecordsImport')
          }
        ]
      },
      {
        path: '/omFinanceP/RebateManage',
        meta: {
          title: '返利管理'
        },
        redirect: '/omFinanceP/RebateManage',
        component: RouteView,
        children: [
          {
            path: '/omFinanceP/RebateManage/RebateRulesSet',
            meta: {
              title: '返利池使用规则设定',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/RebateManage/RebateRulesSet')
          },
          {
            path: '/omFinanceP/RebateManage/RebatePoolQuery',
            meta: {
              title: '返利池查询',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/RebateManage/RebatePoolQuery')
          },
          {
            path: '/omFinanceP/RebateManage/RebateDetailsQuery',
            meta: {
              title: '返利明细查询',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/RebateManage/RebateDetailsQuery')
          },
          {
            path: '/omFinanceP/RebateManage/RebatePoolManage',
            meta: {
              title: '返利池管理',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/RebateManage/RebatePoolManage')
          },
          {
            path: '/omFinanceP/MoneyManage/FundBalanceStatement',
            meta: {
              title: '资金对账管理',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/MoneyManage/FundBalanceStatement')
          },
          {
            path: '/omFinanceP/RebateManage/RebateInvoiceAudit',
            meta: {
              title: '返利红票审核',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/RebateManage/RebateInvoiceAudit')
          },
          {
            path: '/omFinanceP/RebateManage/RebateInvoiceQuery',
            meta: {
              title: '返利红票查询',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/RebateManage/RebateInvoiceQuery')
          },
          {
            path: '/omFinanceP/RebateManage/RebateProcessReport',
            meta: {
              title: '销售全流程报表',
              keepAlive: true
            },
            component: AsyncComponent('omFinanceP/RebateManage/RebateProcessReport')
          }
        ]
      }
    ]
  }
];
export default menuRoutes;
